function CancelShift(shift_id, shift_date) {
if (confirm('Are you sure you want to cancel this shift?\n\n' +
'Any members already signed up on this shift will be removed from work.')) {
location.href = '/squad_calendar.php//year//view//view_param//cancel_id/' + shift_id + '/cancel_date/' + shift_date;
}
}
function OpenShift(shift_id, shift_date) {
if (confirm('Are you sure you want to reopen this shift?')) {
location.href = '/squad_calendar.php//year//view//view_param//open_id/' + shift_id + '/open_date/' + shift_date;
}
}
function CancelDay(shift_date, weekday) {
if (confirm('Are you sure you want to cancel all shifts on this day?\n\n' +
'Any members already signed up on this day will be removed from work.')) {
location.href = '/squad_calendar.php//year//view//view_param//cancel_date/' + shift_date + '/cancel_weekday/' + weekday;
}
}
function OpenDay(shift_date) {
if (confirm('Are you sure you want to reopen all shifts on this day?')) {
location.href = '/squad_calendar.php//year//view//view_param//open_date/' + shift_date;
}
}
/***********************************************
* Fixed ToolTip script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var tipwidth='400px' //default tooltip width
var tipbgcolor='lightyellow' //tooltip bgcolor
var disappeardelay=250 //tooltip disappear speed onMouseout (in miliseconds)
var vertical_offset="0px" //horizontal offset of tooltip from anchor link
var horizontal_offset="-3px" //horizontal offset of tooltip from anchor link
/////No further editting needed
var ie4=document.all;
var ns6=document.getElementById&&!document.all;
if (ie4||ns6) {
document.write('');
document.write('');
}
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function showhide(obj, e, visible, hidden, tipwidth){
if (ie4||ns6) {
dropmenuobj.style.left=dropmenuobj.style.top=-500
}
if (tipwidth!="") {
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=tipwidth
}
//if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
//else if (e.type=="click")
// obj.visibility=hidden
}
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat") ? document.documentElement : document.body
}
function clearbrowseredge(obj, whichedge){
var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
} else {
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}
function showTip(obj, e) {
if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
// iframe fix for IE
if (ie4) {
dropmenuobj.style.display = "block";
var IfrRef = document.getElementById ? document.getElementById('DivShim') : DivShim;
IfrRef.style.width = dropmenuobj.offsetWidth;
IfrRef.style.height = dropmenuobj.offsetHeight;
IfrRef.style.top = dropmenuobj.style.top;
IfrRef.style.left = dropmenuobj.style.left;
IfrRef.style.zIndex = dropmenuobj.style.zIndex - 1;
IfrRef.style.display = "block";
//alert(IfrRef.style.left);
}
}
}
function hideTip(){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
var IfrRef = document.getElementById ? document.getElementById('DivShim') : DivShim;
IfrRef.style.display = "none";
}
}
function showComment(obj, e, shift_date) {
if (window.event) {
event.cancelBubble=true
} else if (e.stopPropagation) {
e.stopPropagation()
}
dropmenuobj=document.getElementById ? document.getElementById("tipdiv") : tipdiv
dropmenuobj.innerHTML="Loading Comments...
"
xmlhttpGet("/ajax-squad_calendar_readcomment.php//shift_date/" + shift_date + "/rnd/" + (new Date()).getTime(), dropmenuobj);
showTip(obj, e);
}
function showShiftInfo(obj, e, shift_id) {
if (window.event) {
event.cancelBubble=true
} else if (e.stopPropagation) {
e.stopPropagation()
}
dropmenuobj=document.getElementById ? document.getElementById("tipdiv") : tipdiv
dropmenuobj.innerHTML="Loading Shift Information...
"
xmlhttpGet("/ajax-squad_calendar_shiftinfo.php//shift_id/" + shift_id + "/rnd/" + (new Date()).getTime(), dropmenuobj);
showTip(obj, e);
}
function showDetailAssignmentInfo(obj, e, detail_assignment_id) {
if (window.event) {
event.cancelBubble=true
} else if (e.stopPropagation) {
e.stopPropagation()
}
dropmenuobj=document.getElementById ? document.getElementById("tipdiv") : tipdiv
dropmenuobj.innerHTML="Loading Detail Information...
"
xmlhttpGet("/ajax-squad_calendar_detailinfo.php//detail_assignment_id/" + detail_assignment_id + "/rnd/" + (new Date()).getTime(), dropmenuobj);
showTip(obj, e);
}
function DeleteComment(shift_date, comment_id) {
if (confirm('Are you sure you want to delete this comment?')) {
dropmenuobj=document.getElementById ? document.getElementById("tipdiv") : tipdiv
dropmenuobj.innerHTML="Deleting Comment..."
xmlhttpGet("/ajax-squad_calendar_readcomment.php//shift_date/" + shift_date + "/delcom/" + comment_id + "/rnd/" + (new Date()).getTime(), dropmenuobj);
}
}
function showUserInfo(obj, e, request_id){
if (window.event) {
event.cancelBubble=true
} else if (e.stopPropagation) {
e.stopPropagation()
}
dropmenuobj=document.getElementById ? document.getElementById("tipdiv") : tipdiv
dropmenuobj.innerHTML="Loading Details...
"
xmlhttpGet("/ajax-squad_shiftdetails.php//request_id/" + request_id + "/rnd/" + (new Date()).getTime(), dropmenuobj);
showTip(obj, e);
}
function showRequestComment(obj, e, request_id, request_id2){
if (window.event) {
event.cancelBubble=true
} else if (e.stopPropagation) {
e.stopPropagation()
}
dropmenuobj=document.getElementById ? document.getElementById("tipdiv") : tipdiv
dropmenuobj.innerHTML="Loading Comment...
"
xmlhttpGet("/ajax-squad_review_readcomment.php//request_id/" + request_id + "/request_id2/" + request_id2 + "/rnd/" + (new Date()).getTime(), dropmenuobj);
showTip(obj, e);
}